package com.hotel.service;

import com.hotel.dao.GuestRegistrationMapper;
import com.hotel.pojo.GuestRegistration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class GuestRegistrationServiceImpl implements GuestRegistrationService {

    @Autowired
    GuestRegistrationMapper GuestRegistrationMapper;

    public int addGuestRegistration(GuestRegistration GuestRegistration) {
        return GuestRegistrationMapper.addGuestRegistration(GuestRegistration);
    }

    public int deleteGuestRegistrationById(int id) {
        return GuestRegistrationMapper.deleteGuestRegistrationById(id);
    }

    public int updateGuestRegistrationById(GuestRegistration GuestRegistration) {
        return GuestRegistrationMapper.updateGuestRegistrationById(GuestRegistration);
    }

    public GuestRegistration queryGuestRegistrationById(int id) {
        return GuestRegistrationMapper.queryGuestRegistrationById(id);
    }

    public ArrayList<GuestRegistration> queryAllGuestRegistration() {
        return GuestRegistrationMapper.queryAllGuestRegistration();
    }

    public GuestRegistration queryGuestRegistrationByPhone(String phone) {
        return GuestRegistrationMapper.queryGuestRegistrationByPhone(phone);
    }
}
